package jspservlet.servlet;
import java.io.IOException;
//import java.io.PrintWriter;
import java.util.ArrayList;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import jspservlet.dao.DeviceDAO;
import jspservlet.dao.impl.DeviceDAOImpl;
import jspservlet.vo.Safety;
import jspservlet.vo.FireSafety;

import jspservlet.vo.Connection;

public class BeSafeServlet {
    

    public void doGet(HttpServletRequest req,HttpServletResponse res) 
		throws IOException,ServletException{
	}

	public void doPost(HttpServletRequest req,HttpServletResponse res) 
			throws IOException,ServletException{
        DeviceDAO dao = new DeviceDAOImpl();

   
        FireSafety fireSafety = new FireSafety();
        fireSafety.setAlarm(1);
        fireSafety.setDeviceid(req.getParameter("deviceid"));

        try {
            int flag = dao.changeMode(fireSafety);
        } catch (Exception e) {
            e.printStackTrace();
        } 
    }
   
}
    

